package com.lhd.action.observer;

/**
 * @Author: liuhd
 * @Date: 2024/12/18 20:24
 * @Description:
 */
public class ConcreteUp extends Up {
    @Override
    public void addFan(Fan fan) {
        super.fans.add(fan);
    }

    @Override
    public void delFan(Fan fan) {
        super.fans.remove(fan);
    }

    @Override
    public void notifyFans(String msg) {
        for (Fan fan : fans) {
            fan.update(msg);
        }
    }
}
